home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1186_palette_does_not_load_in_Workspace.rtf < prev    next >
Text File  |  1995-06-12  |  3KB  |  56 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;\f2\fmodern Ohlfs;}
  2. \paperw11440
  3. \paperh10380
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;\red84\green84\blue84;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  I have designed a custom palette in InterfaceBuilder which contains a subclass of View called MyView.  When I create a new application, load the palette and test it in Test Interface mode, everything looks fine.  When run make on the application there are no errors.  However, when I launch the application from the Workspace Manager it dies because the MyView object is not in the run module.  What am I doing wrong? \
  8.  
  9. \i     \
  10.  
  11. \i0 A:  When you create a loadable palette in InterfaceBuilder with a special class like MyView, you need to also distribute the code (in some form) for that class.  This then needs to be linked into the application.  There are two ways to do this:\
  12. \
  13.  
  14. \fi-980\li980\fc1\cf1 1)    
  15. \b Distribute the .m and .h for the class.
  16. \b0 \
  17.  
  18. \fc0\cf0     In NEXTSTEP Release 2, you would then add these to the "[.hm] (class)" category of the project.\
  19.     \
  20.     In NEXTSTEP Release 3, you opens his project folder PB.project via ProjectBuilder, and adds the [.m] file by selecting Classes in the browser and choosing Add from the Files Menu. The corresponding header file is then added automatically, and can be viewed under the Headers folder in the browser. \
  21.     \
  22.  
  23. \fc1\cf1 2)    
  24. \b Distribute the .o and .h for the class.
  25. \b0 \
  26.  
  27.     In NEXTSTEP Release 2, you would then add the .h to the ".h (other)" category of the project.  You would also add the .o to the "Other files" category of the project.\
  28.     \
  29.     In NEXTSTEP Release 3, you would add the .h by selecting Headers  in the Project Builder browser and 
  30. \fc0\cf0 choosing Add from the Files Menu
  31. \fc1\cf1 . An pane opens, and the you select the header file to be added.\
  32.  
  33. \fi-260\li260\fc0\cf0 \
  34.  
  35. \fi0\li0 In both NEXTSTEP versions, you also need to create a Makefile.preamble which contains the following line:\
  36.     \
  37.  
  38. \f1\fs24\fc1\cf1     OTHER_OFILES = MyView.o\
  39.  
  40. \f0\fs28\fc0\cf0 \
  41.  
  42. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1\cf1 See /NextLibrary/Documentation/NextDev/DevTools/01_PuttingTogether.rtf for more information.
  43. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 \
  44.  
  45. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0\cf0 \
  46. See also:  The InterfaceBuilder 2.0 Release Notes for more information on building and using custom palettes for NEXTSTEP Release 2, and the InterfaceBuilder 3.0 Release Notes for NEXTSTEP Release 3.\
  47.          \
  48. See also the examples in /NextDeveloper/Examples/InterfaceBuilder.  Note that BlinkPalette and SketchPalette only exist in NEXTSTEP Release 2.\
  49. \
  50.  
  51. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0\cf0 QA606    \
  52. \
  53. Valid for 2.0, 3.0, 3.1            \
  54. \
  55.  
  56.